package com.maila.xiaoaobusiness.activity;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;

import com.maila.xiaoaobusiness.R;
import com.maila.xiaoaobusiness.utils.AlertUtil;

import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * 添加商品
 * Created by mark on 2017/11/30.
 */

public class AddNewGoodActivity extends AppCompatActivity {
    @BindView(R.id.tv_money)
    EditText etMoney;
    @BindView(R.id.tv_end_date)
    TextView tvClass;
    @BindView(R.id.iv_good)
    ImageView ivGood;
    @BindView(R.id.et_price)
    EditText etPrice;
    @BindView(R.id.et_big_fee)
    EditText etBigFee;
    @BindView(R.id.et_num)
    EditText etNum;
    @BindView(R.id.et_min_num)
    EditText etMinNum;
    List<String> classes;
    String classname;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_add_new_good);
        ButterKnife.bind(this);
    }

    @OnClick({R.id.white_return_iv, R.id.rl_choose_class, R.id.iv_good, R.id.btn_save_new, R.id.btn_save_back})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.white_return_iv:
                finish();
                break;
            case R.id.rl_choose_class:
                AlertUtil.showSingleChoiceDialog(this, "", classes, new AlertUtil.Alertlinstner() {
                    @Override
                    public void clickConfirm() {

                    }

                    @Override
                    public void clickSingle(int position) {
                        classname=classes.get(position);
                    }
                });
                break;
            case R.id.iv_good:
                break;
            case R.id.btn_save_new:
                break;
            case R.id.btn_save_back:
                break;
        }
    }
}
